// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 固资预测配置类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2024-09-14
 */
public enum InvestmentConfigTypeEnum {
    TYPE_CHANNEL(1, "渠道"),
    TYPE_CATEGORY(2, "品类"),
    TYPE_BRAND(3, "品牌"),
    TYPE_PLANT(4, "工厂"),
    TYPE_MARGIN(5, "Margin"),
    TYPE_LOSS(6, "损益费率"),
    TYPE_TURNOVER(7, "周转天数"),
    TYPE_LIFESPAN(8, "资产寿命");
    private int value;

    private String name;

    InvestmentConfigTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        InvestmentConfigTypeEnum arrObj[] = InvestmentConfigTypeEnum.values();
        for (InvestmentConfigTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
